package ${package}.entity;

import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import org.hibernate.annotations.GenericGenerator;
import com.appopay.common.base.anno.Comment;

/**
 * @author ${author}
 * @since ${date}
 * @description：${tableComment}
 */
@Entity
@Table(name = "${table_name}")
@Comment("${tableComment}")
@Data
public class ${TableName} implements Serializable {
    private static final long serialVersionUID = 1L;
    <#list  columns as field>
    <#if field.isPk=="1">
    @Id
        <#if field.javaType=="String">
    @GeneratedValue(generator="system-uuid")
    @GenericGenerator(name="system-uuid", strategy = "uuid.hex")
        <#else >
    @GeneratedValue(strategy= GenerationType.IDENTITY)
        </#if>
    @Column(name = "${field.column_name!}")
        <#else>
    @Column(name = "${field.column_name!}")
    </#if>
    @Comment("${field.columnComment!}")
    private ${field.javaType} ${field.columnName};
</#list>
}
